
import java.math.BigInteger;

public class e025 {
    public static void main(String[] args) {
        long sTime = System.currentTimeMillis();
        BigInteger[] fib = new BigInteger[100000];
        fib[1] = BigInteger.ONE;
        fib[2] = BigInteger.ONE;
        int ans = 0;
        for (int i = 3; ; i++) {
            BigInteger n = fib[i-1].add(fib[i-2]);
            fib[i] = n;
            if (fib[i].toString().length() == 1000) {
                ans = i;
                break;
            }
        }
        System.out.println(ans);
        long fTime = System.currentTimeMillis();
        System.out.println("Time: " + (fTime - sTime) + "ms");
    }
}